package com.chare.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.chare.pojo.Admin;
import com.chare.pojo.RespBean;
import com.chare.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shi
 * @since 2022-06-17
 */
public interface IAdminService extends IService<Admin> {
    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    RespBean login(String username, String password, String code, HttpServletRequest request);



//根据用户名获取用户
    Admin getAdminByUserName(String username);
    //根据用户id查角色 从而获得权限
    List<Role> getRoles(Integer adminId);

    List<Admin> getAllAdmin(String keywords);


}
